;;;Creates double plan viewports just inside our standard ANSI-D size sheet border.
;;;Includes a notch around our revision block.
;;;Creates double profile viewports on grid indices over our standard ANSI-D size sheet border
;;;and profile grid block.
;;;
;;;Expects the border and grid block to be scaled 1:1 with origin at 0.0,0.0 per standard.
;;;
;;;	Author:
;;;		Henry C. Francis
;;;		425 N. Ashe St.
;;;		Southern Pines, NC 28387
;;;
;;;     http://paracadd.com
;;;	All rights reserved.
;;;
;;;	Copyright: 2-6-2006
;;;	   Edited: 10-31-2008
;;;
(defun c:ansiddblppvp ()
  (command)
  (setq old_vp_osmode (getvar"osmode"))
  (setq old_vp_cecolor (getvar "cecolor"))
  (setq old_vp_celtype (getvar "celtype"))
  (setvar "osmode" 0)
  (setvar "cecolor" "ByLayer")
  (setvar "celtype" "ByLayer")
  (if ukword nil (load "ukword" "File UKWORD.LSP not found! "))
  (setq whichgrid (strcat(ukword 1 "20 30 40 50 60" "Horiz.scale? [20/30/40/50/60]" (if whichgrid (substr whichgrid 1 2) "50")) "dblppgrid"))
  (command "pspace")
  (command ".-layer" "m" "c-vi027nplt" "")
  (command ".mview" "p" "1.98,16.19" "31.0,16.19" "31.0,20.3314" "27.2342,20.3314" "27.2342,21.38" "1.98,21.38" "")
  (command ".-layer" "m" "c-vi017nplt" "")
  (cond
    ((eq (substr whichgrid 1 2) "50")
       (command ".mview" "3.6592,11.4" "29.6592,16.9" ""))
    ((or (eq  (substr whichgrid 1 2) "20")(eq (substr whichgrid 1 2) "40"))
       (command ".mview" "4.1592,11.4" "29.1592,16.9" ""))
    ((or (eq (substr whichgrid 1 2) "30")(eq (substr whichgrid 1 2) "60"))
       (command ".mview" "2.6591,11.4" "29.9925,16.9" ""))
  )
  (command ".-layer" "m" "c-vi047nplt" "")
  (command ".mview" "1.98,5.76" "31.0,10.95" "")
  (command ".-layer" "m" "c-vi037nplt" "")
  (cond
    ((eq (substr whichgrid 1 2) "50")
       (command ".mview" "3.6592,0.97" "29.6592,6.47" ""))
    ((or (eq  (substr whichgrid 1 2) "20")(eq (substr whichgrid 1 2) "40"))
       (command ".mview" "4.1592,0.97" "29.1592,6.47" ""))
    ((or (eq (substr whichgrid 1 2) "30")(eq (substr whichgrid 1 2) "60"))
       (command ".mview" "2.6591,0.97" "29.9925,6.47" ""))
  )
  (setvar "osmode" old_vp_osmode)
  (setvar "cecolor" old_vp_cecolor)
  (setvar "celtype" old_vp_celtype)
  (princ)
)